package org.dromara.cms.domain.bo;

import org.dromara.cms.domain.CmsModel;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 内容模型业务对象 cms_model
 *
 * @author Spring
 * @date 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CmsModel.class, reverseConvertGenerate = false)
public class CmsModelBo extends BaseEntity {

    /**
     * 模型ID
     */
    @NotNull(message = "模型ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 模型名称
     */
    @NotBlank(message = "模型名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String modelName;

    /**
     * 模型标识
     */
    @NotBlank(message = "模型标识不能为空", groups = { AddGroup.class, EditGroup.class })
    private String modelCode;

    /**
     * 模型类型(article/page/category)
     */
    @NotBlank(message = "模型类型(article/page/category)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String modelType;

    /**
     * 数据表名
     */
    @NotBlank(message = "数据表名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tableName;

    /**
     * 是否系统模型(0否 1是)
     */
//    @NotNull(message = "是否系统模型(0否 1是)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long isSystem;

    /**
     * 状态(0正常 1停用)
     */
    @NotBlank(message = "状态(0正常 1停用)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String state;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
